load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "systemconfigwatcher",
    srcs = ["cache.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/server/systemconfigwatcher",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/config",
        "//pkg/config/zonepb",
        "//pkg/keys",
        "//pkg/kv/kvclient/rangefeed",
        "//pkg/kv/kvclient/rangefeed/rangefeedbuffer",
        "//pkg/kv/kvclient/rangefeed/rangefeedcache",
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/util/hlc",
        "//pkg/util/stop",
        "//pkg/util/syncutil",
    ],
)

go_test(
    name = "systemconfigwatcher_test",
    srcs = [
        "cache_test.go",
        "main_test.go",
        "system_config_watcher_test.go",
    ],
    deps = [
        ":systemconfigwatcher",
        "//pkg/base",
        "//pkg/config",
        "//pkg/config/zonepb",
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/kv/kvclient/kvtenant",
        "//pkg/kv/kvclient/rangefeed",
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/sql",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/protoutil",
        "//pkg/util/syncutil",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_kr_pretty//:pretty",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
